/**
 * 
 */
package com.entelgy.batch.rege;

import org.springframework.batch.item.file.mapping.FieldSetMapper;
import org.springframework.batch.item.file.transform.FieldSet;
import org.springframework.validation.BindException;



/**
 * @author acogoluegnes
 *
 */
public class FiltroCeroDriverUnoFieldSetMapper implements FieldSetMapper<FiltroCeroDriverUno> {
	
	/*
	 * (non-Javadoc)
	 * @see org.springframework.batch.item.file.mapping.FieldSetMapper#mapFieldSet(org.springframework.batch.item.file.transform.FieldSet)
	 */
	public FiltroCeroDriverUno mapFieldSet(FieldSet fieldSet) throws BindException {
		FiltroCeroDriverUno filtroCeroDriverUno = new FiltroCeroDriverUno();
		filtroCeroDriverUno.setCodTipoFiltro(0);
		filtroCeroDriverUno.setUnidadCentroCoste(fieldSet.readString(""));
		filtroCeroDriverUno.setFormulaDriverUno("1");
		filtroCeroDriverUno.setValorDriverUno(1);
		return filtroCeroDriverUno;
	}
	
}
